<?php
class A
{
    public function say()
    {
        return "i'm a\r\n";
    }
}
class B
{
    public function say()
    {
        return "i'm b\r\n";
    }
}

$a=new A;
$b=new B;
echo $a->say();
echo $b->say();

class_alias("B","A",false);//不能覆盖已有的类名

$a=new A;
$b=new B;
echo $a->say();
echo $b->say();

